package com.bpzj.db.mongo.document;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.List;

/**
 * @author bpzj 16:05
 */
@NoArgsConstructor
@Setter
@Getter
@AllArgsConstructor
@ToString
@Document(collection = "test_country")
public class Country {

  @Id
  @Indexed
  private String id;
  private String name;
  private List<String> powerHolder;

  public Country(String name) {
    this.name = name;
  }

  public Country(String id, String name) {
    this.id = id;
    this.name = name;
  }
}
